package com.dream.service.impl;



import com.dream.dao.StudentDao;
import com.dream.dao.impl.StudentDaoImpl;
import com.dream.pojo.Student;
import com.dream.service.StudentService;

import java.util.List;

public class StudentServiceImpl implements StudentService {

    StudentDao studentDao=new StudentDaoImpl();

    @Override
    public List<Student> findStudentsByClazzId(String clazzId) {
        return studentDao.findStudentsByClazzId(clazzId);
    }

    @Override
    public long totalCount(String stuName) {
        return studentDao.totalCount(stuName);
    }

    @Override
    public List<Student> list(String stuName, long pageIndex, long pageSize) {
        return studentDao.list(stuName,pageIndex,pageSize);
    }

    @Override
    public int add(Student student) {
        return studentDao.add(student);
    }

    @Override
    public Student findById(String stuId) {
        return studentDao.findById(stuId);
    }

    @Override
    public int update(Student student) {
        return studentDao.update(student);
    }

    @Override
    public int deleteById(String stuId) {
        return studentDao.deleteById(stuId);
    }

    @Override
    public List<Student> findStudentsByDormitoryId(String dormitoryId) {
        return studentDao.findStudentsByDormitoryId(dormitoryId);
    }
}
